package cn.bjxy.shishaolong.common;

/**
 * 状态码和提示信息
 *
 * @author 时少龙
 */
public class StatusCode {

    /*请求成功*/
    public static final int SUCCESS = 200;
    public static final String SUCCESS_MSG = "操作成功";

    /*请求参数错误*/
    public static final int PARAMETER_ERROR = 1300;
    public static final String PARAMETER_ERROR_MSG = "请求参数错误";

    /*请求成功*/
    public static final int OPERATOR_FAILURE = 1501;
    public static final String OPERATOR_FAILURE_MSG = "操作失败";

    /*服务器内部错误*/
    public static final int SERVER_INNER_ERROR = 500;
    public static final String SERVER_INNER_ERROR_MSG = "服务器内部错误";

    /*用户名错误*/
    public static final int USER_NAME_ERROR = 1301;
    public static final String USER_NAME_ERROR_MSG = "用户名错误";

    /*密码错误*/
    public static final int PASSWORD_ERROR = 1302;
    public static final String PASSWORD_ERROR_MSG = "密码错误";

    /*用户名或密码错误*/
    public static final int USER_OR_PASSWORD_ERROR = 1311;
    public static final String USER_OR_PASSWORD_ERROR_MSG = "用户名或密码错误";

    /*信息错误*/
    public static final int INFO_ERROR = 1304;
    public static final String INFO_ERROR_MSG = "信息错误或为空";

    /*删除失败*/
    public static final int DELETE_FAILUER = 1305;
    public static final String DELETE_FAILUER_MSG = "删除失败";

    /*保存失败*/
    public static final int SAVE_FAILURE = 1306;
    public static final String SAVE_FAILURE_MSG = "保存失败";

    /*新增失败*/
    public static final int ADD_FAILURE = 1307;
    public static final String ADD_FAILURE_MSG = "新增失败";

    /*查询失败*/
    public static final int QUERY_FAILURE = 1308;
    public static final String QUERY_FAILURE_MSG = "查询失败";

    /*修改失败*/
    public static final int UPDATE_FAILURE = 1309;
    public static final String UPDATE_FAILURE_MSG = "修改失败";

    /*非法操作*/
    public static final int DATA_EXIST = 1311;
    public static final String DATA_EXIST_MSG = "数据已存在";


    /*=========修改密码=========*/
    /*旧密码验证失败*/
    public static final int OLD_PASSWORD_ERROR = 1310;
    public static final String OLD_PASSWORD_ERROR_MSG = "旧密码验证失败";


    /*=========token 相关=========*/
    /*token 认证失败*/
    public static final int TOKEN_AUTHEN_FAILURE = 1440;
    public static final String TOKEN_AUTHEN_FAILURE_MSG = "token 认证失败";

    /*token 解析错误*/
    public static final int TOKEN_PARSE_ERROR = 1441;
    public static final String TOKEN_PARSE_ERROR_MSG = "token解析错误";

    /*鉴权失败*/
    public static final int UNAUTHORIZED_ERROR = 401;
    public static final String UNAUTHORIZED_ERROR_MSG = "鉴权失败，请重新登录";

    /*权限不够，无法操作*/
    public static final int INSUFFICIENT_PRIVILEGE = 1442;
    public static final String INSUFFICIENT_PRIVILEGE_MESSAGE = "权限不够，无法操作";

    /*非法操作*/
    public static final int ILLEGAL_OPERATION = 1443;
    public static final String ILLEGAL_OPERATION_MESSAGE = "非法操作";

    /*注册失败*/
    public static final int RESGISTER_FAILURE = 1444;
    public static final String RESGISTER_MSG = "注册失败";

    /*==========================提问回答相关=============================*/
    /*非本人操作*/
    public static final int NOT_OWN_OPERATION = 1500;
    public static final String NOT_OWN_OPERATION_MSG = "非本人操作";

    /*不允许连续追问或回答*/
    public static final int NOT_ALLOW_SECOND_REPLY = 1501;
    public static final String NOT_ALLOW_SECOND_REPLY_MSG = "不允许连续追问或回答";


}
